package com.wiscamp.ninechapters.panels.application.assemblers;


import com.wiscamp.ninechapters.panels.application.command.CreateParameterCommand;
import com.wiscamp.ninechapters.panels.application.command.UpdateParameterCommand;
import com.wiscamp.ninechapters.panels.application.vo.ParameterVO;
import com.wiscamp.ninechapters.panels.domain.entities.Parameter;
import org.mapstruct.*;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring",
        unmappedTargetPolicy = ReportingPolicy.IGNORE,
        unmappedSourcePolicy = ReportingPolicy.IGNORE,
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
        nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface ParameterAssembler {
    ParameterAssembler Instance = Mappers.getMapper(ParameterAssembler.class);

    ParameterVO toParameterVO(Parameter entity);

    Parameter fromCreateCommand(CreateParameterCommand createCommand);

    Parameter fromUpdateCommand(UpdateParameterCommand updateCommand);

}
